home *** CD-ROM | disk | FTP | other *** search
- Path: overload.lbl.gov!news
- From: Mikhail Faiguenblat <mfaiguen@issserv4.lbl.gov>
- Newsgroups: comp.lang.c
- Subject: Re: Locaton of an array?
- Date: 12 Jan 1996 22:29:59 GMT
- Organization: Lawrence Berkeley Laboratory, Berkeley CA
- Message-ID: <4d6nd7$4gg@overload.lbl.gov>
- References: <4d4iqk$hs3@overload.lbl.gov> <4d698s$g4r@news.iag.net>
- NNTP-Posting-Host: issserv4.lbl.gov
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.12 (X11; I; SunOS 5.4 sun4d)
- X-URL: news:4d698s$g4r@news.iag.net
-
- Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov) wrote:
- [stuff deleted]
- : Btw, just out of curiosity, why do you care where it lives in
- : absolute RAM?
-
- I just posted the description of the problem.
- Also, if anyone has written or knows of a C program that uses DMA, how did
- you deal with the issue of having to specify the physical addresses (I do not
- know if that is the issue for other processors, but for x86 it is).
-
- : By the way, the output of %p (as also the result of the (int) cast on
- : a pointer) is upto the implementation. C can be implemented on machines
- : which have no natural mapping onto a flat address space, so the
- : original question may not have a definite meaning. An answer to the
- : `why' that you ask is definitely required before more help can be
- : provided.
-
- Ok, so C works with virtual addresses, and all the registers (such as
- segment register, offset register, etc.) also store virtual addresses.
- Also, a program when being executed writes to and reads from real memory.
- This means that somewhere there is a virtual memory mamnager (?) which
- keeps track of which segment of virtual memory corresponds to which
- segment of real memory.
- Is it done on kernel level?
- I do remember that SB drivers on Linux use DMA, and they are linked into the
- kernel and have a special buffer used for DMA transfer.
-
- Mikhail
-
-